# Contributor: Aiden Grossman <agrossma154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-contourpy
pkgver=1.2.1
pkgrel=1
pkgdesc="Python library for calculating contours in 2D quadrilateral grids Resources"
url="https://github.com/contourpy/contourpy"
arch="all"
license="BSD-3-Clause"
depends="py3-numpy"
makedepends="py3-gpep517 py3-meson-python py3-pybind11-dev python3-dev"
checkdepends="pytest py3-matplotlib py3-wurlitzer"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/contourpy/contourpy/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/contourpy-$pkgver"
options="!check" # circular dependency with matplotlib

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
2bb2ac7436cbee1ebc69e6edaf3166e294de32711cec506ce9a3132f1cf20ff8de70af27b432b81abb582c9fe30239f8724f68936908bdbf6348eb249eaae4d5  py3-contourpy-1.2.1.tar.gz
"
